﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

/// <summary>
/// Summary description for AnswerDL
/// </summary>
internal class AnswerDL
{

    internal static bool Insert(AnswerBL answerBL)
    {
        return OnlineTestHelper.Context.SP_INSERT_ANSWER(answerBL.AnswerText, answerBL.QuestionId, answerBL.Is_Correct, answerBL.UserId) == 0 ? true : false;
    }

    internal static bool Update(AnswerBL answerBL)
    {
        return OnlineTestHelper.Context.SP_UPDATE_ANSWER(answerBL.AnswerId, answerBL.AnswerText, answerBL.Is_Correct, answerBL.UserId) == 0 ? true : false;
    }

    internal static bool Delete(AnswerBL answerBL)
    {
        return OnlineTestHelper.Context.SP_DELETE_ANSWER(answerBL.AnswerId) == 0 ? true : false;
    }
}